
<div class="grid_8">
   <div class="box">
      <div class="header">
      <?php echo $this->Html->image('icons/packs/fugue/16x16/shadeless/table-excel.png',
array("width" => 16, "height" => 16)); ?>
      <h3>Criaderos</h3><span></span>
      </div><!--end of header-->
      <div class="content">
         <table id="table-example" class="table">
            <thead>
               <tr>
                <th>Nro</th>
                <th>Nombre</th>
                <th>Habilitado</th>
                <th>Direccion</th>
                <th>Telefono</th>
                <th>Acciones</th>
               </tr>
            </thead><!--end of thead table-->
            <tbody>
              <?php $i = 0; ?>
              <?php foreach ($criaderos as $criadero): ?>
                                    
              <tr <?php echo fmod($i, 2) ? "class = gradeX" : "gradeA"; ?>>
              <?php $i++; ?>
              <td><?php echo $criadero['Criadero']['id']; ?></td>
              
              <td class="center"><?php echo $criadero['Criadero']['nombre']; ?></td>
              <?php
    $estado = $criadero['Criadero']['estado'];
    if ($estado == 1):
        $descestado = "HABILITADO";
    else:
        $descestado = "DESHABILITADO";
    endif;
?>      
              <td class="center">
                <span <?php echo fmod($estado, 2) ? "class = deshabilitado" :
"habilitado"; ?>>
                 <?php echo $descestado; ?>
                </span>
              </td>
              <td><?php echo $criadero['Criadero']['direccion']; ?></td>
              <td>
              <?php echo $criadero['Criadero']['telefono1']; ?>&nbsp;
              <?php echo $criadero['Criadero']['telefono2']; ?>
              </td>
              <td>
              <?php if($criadero['Criadero']['nombre'] != null): ?>
              <?php echo $this->Html->link('EDITAR', array('action' => "editar",
$criadero['Criadero']['id'], 0), array('escape' => false)); ?>
              <?php else: ?>
              <?php echo $this->Html->link('EDITAR', array('action' => "editar",
$criadero['Criadero']['id'], 1), array('escape' => false)); ?>
              <?php endif; ?>
              <?php echo $this->Html->link('RAZAS', array('action' =>
'editaraza', $criadero['Criadero']['id'])); ?> 
              <?php if ($estado == 1): ?>
              <?php echo $this->Html->link('DESHABILITAR', array('action' =>
"baja", $criadero['Criadero']['id']), array('escape' => false)); ?> 
              <?php else: ?>
              <?php echo $this->Html->link('HABILITAR', array('action' => "alta",
$criadero['Criadero']['id']), array('escape' => false)); ?>              
              <?php endif; ?>
              <?php echo $this->Html->link('VER', array('action' => "ver", $criadero['Criadero']['id']),
array('escape' => false)); ?>              
              &nbsp;
              <?php echo $this->Html->link('ELIMINAR', array('action' =>
"eliminar", $criadero['Criadero']['id']), array('escape' => false), ('Desea realmente eliminar?')); ?>
              &nbsp;
              <?php
            if ($criadero['Inspeccioncriadero']['id'] == null) {
                echo $this->Html->link('INSPECCION', array('action' => "inspeccion", $criadero['Criadero']['id']),
                    array('escape' => false));
                echo " ";
                echo $this->Html->link('Recomendaciones', array('action' => "recomendaciones", $criadero['Criadero']['id']),
                    array('escape' => false));
            } else {
                echo $this->Html->link('verINSPECCION', array('action' => "verinspeccion", $criadero['Criadero']['id']),
                    array('escape' => false));
            }
?>
              </td>
              
              </tr>
              <?php endforeach; ?>
            </tbody>
         </table><!--end of table-->
      </div><!--end of content-->
      <div class="clear"></div>
   </div><!--end of box-->
</div><!--end of grid 12 contendedor tabla-->
<div class="grid_4">
			<div id="blocks" class="box tabbed">
		 		<div class="header">
				<h3>Acciones</h3>
				</div>
				<div class="content">
					<ul id="block-list-icons" class="block-list with-icon tab-content">
						<li class="i-16-calendar">Lista de Usuarios</li>
						<li class="i-16-application"><?php echo $this->Html->link('Registrar nuevo',
array('action' => 'insertar')); ?></li>
						<li class="i-16-drive">
                        <?php echo $this->Html->link('Habilitar criaderos',
array('action' => 'habilitar')) ?>
                        </li>
						<li class="i-16-chart">Reportes</li>
						<li class="i-16-balloon">Lorem ipsum</li>
					</ul>
				</div> <!-- End of .content -->
				</div> <!-- End of .box -->
</div> <!-- End of .grid_4 -->